package com.edu.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class UserSignDTO {

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "电话不能为空")
    private String phone;

    @NotBlank(message = "邮箱不能为空")
//    @Email(message = "邮箱格式不正确")
    private String email;

    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 12, message = "密码长度应为6-12位")
    private String password;

    @NotBlank(message = "确认密码不能为空")
    @Length(min = 6, max = 12, message = "密码长度应为6-12位")
    private String confirmpassword;

    @NotNull(message = "角色不能为空")
    private Integer role;

//    @NotBlank(message = "头像链接不能为空")
//    private String imgurl;
}
